<script language="javascript" src="<?php echo base_url(); ?>application/views/cirugia/funcionAuxiliares.js"></script>
<form class='form-horizontal well'
        id='formCriterios'
        name='formCriterios'
        method="post"
        action='<?php echo base_url().'cirugia/guardarPlani'?>' onSubmit="return ValidatePlaniForm()">
<?php
$active = true;
//latisoft_openForm(base_url().'cirugia/guardarPlani', 'get', 'formCriterios');
    latisoft_openFieldset();    
    latisoft_legend('Planificación de Cirugía');
    
 ?>
<!--Se creara el acrodeon para las zonas-->
<div class="accordion" id="accordion2">
    <div class="accordion-group">
        <div class="accordion-heading">
        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseOne">
            Datos de Orden Cirugía
        </a>
        </div>
        <div id="collapseOne" class="accordion-body collapse">
        <div class="accordion-inner">
         <?php            
                $argumento=array('codPac'=> $codPac,'NomPac'=> $NomPac,'codOrd'=> $codOrd,'EstOrd'=> $EstOrd,'esp'=> $esp,'nomEspe'=> $nomEspe);
                $this->load->view('cirugia/datosOrdenCiru',$argumento);
         ?> 
        </div>
        </div>
    </div>
    <div class="accordion-group">
        <div class="accordion-heading">
        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseTwo">
            Descripción Cirugía
        </a>
        </div>
        <div id="collapseTwo" class="accordion-body collapse " >
            <div class="accordion-inner">
            <?php
                    $this->load->view('cirugia/descripCiru');
            ?> 
            </div>
        </div>
    </div>
    
    <div class="accordion-group">
        <div class="accordion-heading">
        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseFour">
            Lista de Exámenes
        </a>
        </div>
        <div id="collapseFour" class="accordion-body collapse">
        <div class="accordion-inner">
         <?php            
                //$argumento=array('codPac'=> $codPac,'NomPac'=> $NomPac,'codOrd'=> $codOrd,'EstOrd'=> $EstOrd,'esp'=> $esp,'nomEspe'=> $nomEspe);
                //$this->load->view('cirugia/listaExamenes',$argumento);
                 $this->load->view('cirugia/listaExamenes');
         ?> 
        </div>
        </div>
    </div>
    
    
    <div class="accordion-group">
        <div class="accordion-heading">
        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseFive">
            Medicamentos para Cirugía
        </a>
        </div>
        <div id="collapseFive" class="accordion-body collapse">
        <div class="accordion-inner">
         <?php            
                //$argumento=array('codPac'=> $codPac,'NomPac'=> $NomPac,'codOrd'=> $codOrd,'EstOrd'=> $EstOrd,'esp'=> $esp,'nomEspe'=> $nomEspe);
                //$this->load->view('cirugia/listaExamenes',$argumento);
                 $this->load->view('cirugia/medicamentosCirugia');
         ?> 
        </div>
        </div>
    </div>
     <div class="accordion-group">
        <div class="accordion-heading">
        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseSix">
            Equipos para Cirugía
        </a>
        </div>
        <div id="collapseSix" class="accordion-body collapse">
        <div class="accordion-inner">
         <?php  
                 $this->load->view('cirugia/equiposxCirugia');
         ?> 
        </div>
        </div>
    </div>
    
    <div class="accordion-group">
        <div class="accordion-heading">
        <a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion2" href="#collapseThree">
            Programación de Cirugía
        </a>
        </div>
        <div id="collapseThree" class="accordion-body collapse " >
        <div class="accordion-inner">
         <?php
            $argumento=array('comboAmbiente'=> $comboAmbiente);    
            $this->load->view('cirugia/promCiru');
         ?> 
        </div>
        </div>
    </div>
 </div>

<!--Parte del registro-->

    <div class="control-group">
        <label class="control-label" for="codCir">Doctor Registrante: </label>
        <div class="controls">
            <input value="<?php echo $codPerEnSesion?>" id="campoDocReg" name="campoDocReg" class="input-small" type="text" placeholder="Cod. Doctor" onblur="cargaDoctor(this.id,'nomDoc','buscarDoctor')">
            <input readonly="readonly" id="nomDoc" name="nomDoc" type="text" value="<?php echo $nomPerEnSesion?>" >
            <button class="btn btn-mini  btn btn-success" type="button" onclick="buscarEmple('codEnf','nomEnf','cod','name')">Buscar</button>
        </div>
    </div>
    <div class="control-group">        
        <div class="controls">
            <button class="btn btn-success" type="submit"  >Guardar</button>
            <button class="btn btn-danger" type="button">Cancelar</button>            
        </div>
    </div>

<?php latisoft_closeFieldset() ?> 
</form>
<!--Fin del formulario-->


<!-- Ventana Modal para búsqueda de órdenes -->
<div class="modal" id="myModaO" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display:none;width:900px;">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="myModalLabel">Buscar Orden Preoperatoria</h3>
    </div>
    <div class="modal-body" style="height:550px;">
   
        <?php
//        latisoft_hiddenInput('buscar', 'true');

    latisoft_openFieldset();
    
        latisoft_legend('Criterios de Búsqueda');
        latisoft_inputText("codOrden", "Código Órden Preoperatoria", "", $active);
        latisoft_inputText("codPaciente", "Código Paciente", "", $active);
        latisoft_inputText("nombres", "Nombres", "", $active);
        latisoft_inputText("apePat", "Apellido Paterno", "", $active);
        latisoft_inputText("apeMat", "Apellido Materno", "", $active);
    latisoft_closeFieldset();


?>
        
        <div class="control-group">
            <button class="btn btn-mini  btn btn-success" type="button" onclick="busquedaOrden('codOrden','codPaciente','nombres','apePat', 'apeMat','tablOrd','buscarOrden')">Buscar</button>
        </div>        


        <table id="tablOrd" class="table table-hover" width="700px">
            <tbody>
            <caption><h4>Ordenes</h4></caption>
                <thead>
                <th>Id.Orden</th>
                <th>Fecha</th>
                <th>Cod.Paciente</th>
                <th>Nombres</th>
                <th>A. Paterno</th> 
                <th>Estado</th>
                </thead>
           </tbody>
          </table>
    </div>
    <div class="modal-footer">
        <button class="btn btn-primary" data-dismiss="modal" aria-hidden="true">Close</button>        
    </div>
</div>

<!-- Personal -->
<div class="modal" id="myModalP" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display:none;width:700px;">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true" onclick="limpiartabla('tablPac')" >×</button>
        <h3 id="myModalLabel">Buscar Personal</h3>
    </div>
    <div class="modal-body" style="height:550px;">
        <div class="control-group">
            <label class="control-label" for="Documento">Documento</label>
            <div class="controls"><input type="text" class="input-xlarge" id="Documento"></div>
        </div>
        <div class="control-group">
            <label class="control-label" for="confNombre">Nombres</label>
            <div class="controls"><input type="text" class="input-xlarge" id="confNombre"></div>
        </div>
        <div class="control-group">
            <label class="control-label" for="ApellidoPat">Apellido Paterno</label>
            <div class="controls"><input type="text" class="input-xlarge" id="ApellidoPat"></div>
        </div>
        <div class="control-group">
            <label class="control-label" for="ApellidoMat">Apellido Materno</label>
            <div class="controls"><input type="text" class="input-xlarge" id="ApellidoMat"></div>
        </div>        
        <div class="control-group">
            <button class="btn btn-mini  btn btn-success" type="button" onclick="realizarbusqPer('Documento','confNombre','ApellidoMat','ApellidoPat','tablPer','buscarPer','cod','name','','')">Buscar</button>
        </div>
        <input type="hidden" id="cod" value="">
        <input type="hidden" id="name" value="">
        <table id="tablPer" class="table table-hover" width="700px">
            <tbody>
            <caption><h4>Personal</h4></caption>
                <thead>
                <th>Codigo</th>
                <th>Nombres</th>
                <th>Apellidos</th>
                <th>Tipo</th> 
                </thead>
           </tbody>
          </table>
    </div>
    <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true" onclick="limpiartabla('tablPac')">Close</button>        
    </div>
</div>


